package com.sense.kukoo.biz_explore.adapter.provider

import com.sense.kukoo.common.R
import com.sense.kukoo.biz_explore.adapter.SearchAdapter
import com.sense.kukoo.common.repo.bean.SearchBean
import com.sense.kukoo.common.wiget.adapter.provider.MultiItemProvider
import com.sense.kukoo.common.wiget.adapter.viewholder.BaseViewHolder

class RecentTitleProvider(val listener: SearchAdapter.SearchEventListener):
    MultiItemProvider<SearchBean>() {

    override fun getItemType(): Int = SearchBean.TYPE_RECENT_TITLE

    override fun getItemLayoutId(): Int = R.layout.common_search_recent_title

    override fun onBindViewHolder(viewHolder: BaseViewHolder, item: SearchBean) {
        viewHolder.getView(R.id.tv_btn_clean_all).setOnClickListener {
            listener.onRecentCleanAll()
        }
    }
}